const initData = [];

export const addTodoAction = (payload) => {
  return {
    type: 'ADD',
    payload
  }
}
export default function todoReducer(state = initData, action) {
  switch (action.type) {
    case 'ADD':
      return [...state, action.payload]

    default:
      return state;
  }
}